home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
mac
/
LOGIC Apple II 5.25" Library - DOS Part 1
/
DOS002.dsk
/
RAM TEST 48K.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
3KB
|
85 lines
1 REM AREVISION 8-2-79
2 REM WRITTEN BY PHILIP A. WASSON
10 TEXT : HOME
20 PRINT "THIS PROGRAM REPEATEDLY TESTS"
25 PRINT "ALL 48K OF RAM"
30 PRINT "FOR 'HARD' ERRORS AND DISPLAYS THE"
40 PRINT "ROW AND COLUMN OF THE DEFECTIVE CHIP."
50 FOR I = 1 TO 5000: NEXT
80 HEX$ = "0123456789ABCDEF"
90 LO = 768:HI = 1023
10000 REM
10010 REM RAM TEST
10020 REM
10030 REM SETUP ASSEMBLY ROUTINE
10040 REM
10060 POKE 768,165: POKE 769,0: POKE 770,141
10070 POKE 771,95: POKE 772,3: POKE 773,165
10080 POKE 774,1: POKE 775,141: POKE 776,96
10090 POKE 777,3: POKE 778,169: POKE 779,2
10100 POKE 780,133: POKE 781,0: POKE 782,160
10110 POKE 783,0: POKE 784,140: POKE 785,97
10120 POKE 786,3: POKE 787,132: POKE 788,1
10130 POKE 789,177: POKE 790,0: POKE 791,141
10140 POKE 792,94: POKE 793,3: POKE 794,169
10150 POKE 795,255: POKE 796,145: POKE 797,0
10160 POKE 798,81: POKE 799,0: POKE 800,208
10170 POKE 801,31: POKE 802,145: POKE 803,0
10180 POKE 804,81: POKE 805,0: POKE 806,208
10190 POKE 807,25: POKE 808,173: POKE 809,94
10200 POKE 810,3: POKE 811,145: POKE 812,0
10210 POKE 813,230: POKE 814,0: POKE 815,208
10220 POKE 816,2: POKE 817,230: POKE 818,1
10230 POKE 819,165: POKE 820,1: POKE 821,201
10240 POKE 822,3: POKE 823,208: POKE 824,2
10250 POKE 825,230: POKE 826,1: POKE 827,201
10260 POKE 828,192: POKE 829,208: POKE 830,214
10270 POKE 831,240: POKE 832,8: POKE 833,141
10280 POKE 834,97: POKE 835,3: POKE 836,173
10290 POKE 837,94: POKE 838,3: POKE 839,145
10300 POKE 840,0: POKE 841,165: POKE 842,0
10310 POKE 843,141: POKE 844,98: POKE 845,3
10320 POKE 846,165: POKE 847,1: POKE 848,141
10330 POKE 849,99: POKE 850,3: POKE 851,173
10340 POKE 852,95: POKE 853,3: POKE 854,133
10350 POKE 855,0: POKE 856,173: POKE 857,96
10360 POKE 858,3: POKE 859,133: POKE 860,1
10370 POKE 861,96: POKE 862,0: POKE 863,0
10380 HOME
10390 VTAB 5: PRINT " 48K RAM TEST"
10400 VTAB 7
10410 CALL 768
10420 AD = 256 * PEEK(867) + PEEK(866)
10430 DA = PEEK(865)
10440 IF DA < >0 THEN 10540
10450 FOR I = LO TO HI
10460 SA = PEEK(I): POKE I,255:DA = 255 - PEEK(I): POKE I,SA
10470 IF DA < >0 THEN AD = I:I = HI: GOTO 10500
10480 SA = PEEK(I): POKE I,0:DA = PEEK(I): POKE I,SA
10490 IF DA < >0 THEN AD = I:I = HI: GOTO 10500
10500 NEXT
10510 PASS = PASS +1
10520 VTAB 22: HTAB 12: PRINT "PASS ";PASS;" COMPLETE": VTAB 7
10530 IF DA = 0 THEN 10410
10540 PRINT "ADDRESS DATA RAM FAULT LOCATION"
10550 POKE 216,0
10560 DEC = AD: GOSUB 10670
10570 PRINT " $";HX$;
10580 DEC = DA: GOSUB 10670
10590 HTAB 11: PRINT "$"; RIGHT$(HX$,2);
10600 R$ = MID$ ("CDE", INT(1 +AD/16384),1)
10610 HTAB 20
10620 FOR I = 10 TO 3 STEP -1
10630 DA = 2 *DA
10640 IF DA >255 THEN DA = DA -256: HTAB 25: PRINT R$;"-";I
10650 NEXT
10660 END
10670 HX$ = ""
10680 FOR I = 3 TO 0 STEP -1
10690 P = 16 ^I
10700 H = INT(DEC/P)
10710 DEC = DEC -H *P
10720 HX$ = HX$ + MID$ (HEX$,H +1,1)
10730 NEXT
10740 RETURN
61000 END